from tags import *
import parsers



    
tagChain = {}
tagChain["ofx"] = OFXTag
tagChain["status"] = StatusTag
tagChain["trnuid"] = TRXUniqueID
tagChain["bankmsgsrsv1"] = BankingMessageTag
tagChain["stmttrnrs"]  = StatementTRXSet
tagChain["stmttrn"]   = StatementTRX

def TagFactory(tag, *args):
    return tagChain.setdefault(tag,TagNode)(tag,*args)

def ParserFactory(name="NOOP"):
    return parsers.BasicParser(TagFactory)